# -*- coding: utf-8 -*-
# @Time : 2021/7/3 18:20
# @Author : 摘星星的小女孩
# @Email : wayne_lau@aliyun.com
# @File : page_ecshop_front_cancel_order.py
# @Project : ecshop
from selenium.webdriver.common.by import By


class PageEcshopFrontCancelOrder():
    def __init__(self, driver):
        self.driver = driver
        # 元素定位符loc
        self.loc_ele_cancel_order = (By.XPATH,"/html/body/div[8]/div[2]/div/div/div/table/tbody/tr[2]/td[5]/font/a")
    #我的账户
    def ele_cancel_order(self):
        self.driver.find_element(*self.loc_ele_cancel_order).click()#点击【取消】按钮
        self.driver.switch_to.alert.accept() #点击【确认】,取消订单